//***********************************************************************
//	File:		Projectile.h
//	Author:		
//	Course:		SGP 1405
//	Purpose:	
//***********************************************************************
//***********************************************************************
//	Purposfully left blank for all comments regarding this file 
//	
//	
//	
//***********************************************************************



#pragma once
#include "Entity.h"
#include "../SGD Wrappers/SGD_Geometry.h"
#include "../SGD Wrappers/SGD_Handle.h"

class Projectile :
	public Entity
{
public:
	// Trilogy
	Projectile() = default;
	virtual ~Projectile() = default;
	Projectile(const Projectile&) = default;
	Projectile& operator =(const Projectile&) = default; 

	//Type
	int GetType() const { return ENT_PROJECTILE_BASE; }

	//Interface
	void Update(float dt);
	void Render();
	void HandleCollision(const IEntity* pOther);
	void HandleEvent(const SGD::Event* pEvent);
	SGD::Rectangle GetRect() const;

	//Accessors
	float		GetDamage		(void)	const { return m_fDamage; }
	Entity*		GetOwnerType	(void)	const { return m_pOwnerType; }
	bool		GetHasCollided	(void)	const { return m_bHasCollided; }
	SGD::HAudio GetInitialSound	(void)	const { return m_hInitialSound; }
	SGD::HAudio GetFinalSound	(void)	const { return m_hFinalSound; }
	float		GetSpeed		(void)	const { return m_fSpeed; }

	//Mutators
	void    SetOwnerType(Entity*);
	void	SetDamage(float theD)			{ m_fDamage = theD; }
	void	SetHasCollided(bool hc)			{ m_bHasCollided = hc; }
	void	SetInitialSound(SGD::HAudio is) { m_hInitialSound = is; }
	void	SetFinalSound(SGD::HAudio fs)	{ m_hFinalSound = fs; }
	void	SetSpeed(float s)				{ m_fSpeed = s; }
private:
	float m_fDamage = 0.0f; 
	float m_fSpeed = 0.0f; 
	Entity* m_pOwnerType = nullptr; 
	bool m_bHasCollided = false; 
	SGD::HAudio m_hInitialSound = SGD::INVALID_HANDLE; 
	SGD::HAudio m_hFinalSound = SGD::INVALID_HANDLE; 

};

